package edu.nf.ch02.comfig;

import edu.nf.ch02.common.MinioFactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName MinioConfig
 * @Description Minio配置类
 * @Author Kx
 * @Date 2025/9/4 20:27
 * @Version 1.0
 */
// 标识为配置类
@Configuration
public class MinioConfig {
    /**
     * @author: kx
     * @date: 2025/9/4 22:51
     * @return edu.nf.ch02.common.MinioFactoryBean
     * @description: 装配MinioFactoryBean对象
    */
    @Bean
    public MinioFactoryBean minioFactoryBean() {
        MinioFactoryBean factoryBean = new MinioFactoryBean();
        factoryBean.setHost("http://127.0.0.1:9000");
        factoryBean.setAccount("minioadmin");
        factoryBean.setPassword("minioadmin");
        factoryBean.setBucketName("myapp");
        return factoryBean;
    }
}
